#!/usr/bin/env bash -x

#1.输出一个文件夹的所有文件,并且判断是文件,还是目录  -d:判断为目录 -f判断为文件
#if grep -l POSIX $file 抓取信息从一个文件里面
for file in /home/simon/*
do
if [ -d $file ]
then
 echo "这个是个目录:"+$file
elif [ -f $file ];then
echo "这个是个文件:"+$file
fi
done
#2.读取用户输出的值

echo "请输入值:"
read timeofday
if [ $timeofday = "yes" ] ;then
echo "good"
elif [ $timeofday = "no" ] ; then
echo "this is bad"
else
echo "you is a supper man"
fi

exit 0